// pages/dispatch/mine/index/index.js
Page({

  /**
   * 页面的初始数据
   */
  data: { 
    active: 'mine'
  },
  onChange(event) {
    this.setData({ active: event.detail });
    switch ( event.detail){
      case 'tongji':
        wx.redirectTo({ 
          url: '/pages/dispatch/tongji/index'
        });
        break;
        case 'order':
          wx.redirectTo({ 
            url: '/pages/dispatch/order/index'
          });
          break;
          case 'dispatch':
            wx.redirectTo({ 
              url: '/pages/dispatch/dispatchManage/index/index'
            });
            break;
            case 'receive':
              wx.redirectTo({ 
                url: '/pages/dispatch/receive/index/index'
              });
              break;
              case 'mine':
                wx.redirectTo({ 
                  url: '/pages/dispatch/mine/index/index'
                });
                break;
    } 
  },
listChange(){
wx.navigateTo({
  url: '/packageDispatch/pages/mine/device/index',
  success: function(res) {
    // 通过eventChannel向被打开页面传送数据
    res.eventChannel.emit('acceptDataFromOpenerPage', { data: 'test' })
  }
})
},
WLChange(){
  wx.navigateTo({
    url: '/packageDispatch/pages/mine/wuliao/index',
    success: function(res) {
      // 通过eventChannel向被打开页面传送数据
      res.eventChannel.emit('acceptDataFromOpenerPage', { data: 'test' })
    }
  })
  },
YSChange(){
  wx.navigateTo({
    url: '/packageDispatch/pages/yinshou/tongji/index',
    success: function(res) {
      // 通过eventChannel向被打开页面传送数据
      res.eventChannel.emit('acceptDataFromOpenerPage', { data: 'test' })
    }
  })
  },
listChange2(){
  wx.navigateTo({
    url: '/pages/dispatch/mine/vip/index',
  })
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {

  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {

  }
})